﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/AdminPage.master" AutoEventWireup="true" CodeFile="City_Management.aspx.cs" Inherits="CityManagement" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table class="style3" align="center" >
        <tr>
            <td style="background-image: url(../images/bg_head.png); height: 30px" 
                class="style3" colspan="3">

                <asp:Label ID="Label1" runat="server" ForeColor="White" Text="City Management" 
                    Font-Bold="True" ></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="style7">
                Enter City Name:</td>
            <td class="style8" align="center">
                <asp:TextBox ID="txtCName" runat="server" Width="140px" CssClass="style8"></asp:TextBox>
                &nbsp;
                <asp:ImageButton ID="imgbSearch" runat="server" ImageUrl="~/images/img_Search.png" 
                    CssClass="style8" onclick="imgbSearch_Click" />
                <asp:ImageButton ID="imgbShowAll" runat="server" CssClass="style8" 
                    ImageUrl="~/images/img_Show All.png" onclick="imgbShowAll_Click" />
            </td>
            <td class="style7" align="center">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style7" align="center" colspan="2">
                <asp:GridView ID="gvCity" runat="server" AutoGenerateColumns="False" 
                    DataKeyNames="CityID" 
                    EmptyDataText="There are no data records to display." 
                    AllowSorting="True" CellPadding="4" ForeColor="#333333" GridLines="None" 
                    Width="389px" HorizontalAlign="Center" 
                    onrowcommand="gvCity_RowCommand" CaptionAlign="Bottom" ShowFooter="True">
                    <AlternatingRowStyle BackColor="White" />
                    <Columns>
                        <asp:BoundField DataField="CityID" HeaderText="CityID" ReadOnly="True" 
                            SortExpression="CityID" />
                        <asp:BoundField DataField="CityName" HeaderText="CityName" 
                            SortExpression="CityName" />
                        <asp:BoundField DataField="ZipCode" HeaderText="ZipCode" 
                            SortExpression="ZipCode" />
                        <asp:TemplateField HeaderText="Command">
                            <ItemTemplate>
                                <asp:ImageButton ID="imgbUpdate" runat="server" Height="25px" 
                                    ImageUrl="~/images/img_Update.png" CommandArgument='<%# Eval("CityID") %>' 
                                    CommandName="CUpdate" />
                                <asp:ImageButton ID="imgbDelete" runat="server" Height="25px" 
                                    ImageUrl="~/images/img_Delete.png" CommandArgument='<%# Eval("CityID") %>' 
                                    CommandName="CDelete" 
                                    onclientclick="return confirm('Are you want to delete this City ?')" />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <EditRowStyle BackColor="#2461BF" />
                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                    <RowStyle BackColor="#EFF3FB" />
                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                    <SortedAscendingCellStyle BackColor="#F5F7FB" />
                    <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                    <SortedDescendingCellStyle BackColor="#E9EBEF" />
                    <SortedDescendingHeaderStyle BackColor="#4870BE" />
                </asp:GridView>
            </td>
            <td class="style7" align="center">
                &nbsp;</td>
        </tr>
        </table>

</asp:Content>

